<?php defined('InShopNC') or exit('Access Invalid!');?>
<div class="page">
  <div class="fixed-bar">
    <div class="item-title">
      <h3><?php echo $lang['link_index_mb_ad'];?></h3>
      <ul class="tab-base">
        <li><a href="index.php?act=goods_templates&op=index"><span>活动模板管理</span></a></li>
        <li><a href="index.php?act=goods_templates&op=addGt_class"><span>添加活动模板</span></a></li>
        <li><a href="javascript:;" class="current"><span>模板商品管理</span></a></li>
        <li><a href="index.php?act=goods_templates&op=goods_templates_add"><span>添加模板商品</span></a></li>
      </ul>
    </div>
  </div>
  <div class="fixed-empty"></div>
  
    <table class="table tb-type2 nobdb">
      <thead>
      
        <tr class="thead">
          <th>&nbsp;</th>
          <th style="width: 10%">模板id</th>
          <th style="width: 10%">类型</th>
          <th style="width: 30%">名称</th>
          <th style="width: 25%">备注</th>
          <th style="width: 30%">模板图片</th>
           
          <th style="width: 15%" class="align-center"><?php echo $lang['nc_handle'];?></th>
        </tr>
      </thead>
      <tbody>
        <?php if(!empty($output['goods_templates_list']) && is_array($output['goods_templates_list'])){ ?>
        <?php foreach($output['goods_templates_list'] as $k => $v){ ?>
        <tr class="hover edit">
          <td class="w24"></td>
		<td style="width: 10%"><?php echo $v['gt_class_id'];?></td>
          <?php if ($v['is_goods']==1){?>
          <td style="width: 10%;height: auto;">商品</td>
          <td style="width: 30%;height: auto;"><?php echo $v['goods_name'];?></td>
          <td style="width: 25%;height: auto; "><img style="width: 50%;height: auto;" alt="" src="<?php echo $v['goods_image'];?>"> </td>
          <?php }?>
          
          <?php if ($v['is_voucher']==1){?>
          <td style="width: 10%;height: auto;">代金券</td>
          <td style="width: 30%;height: auto;"><?php echo $v['voucher'];?></td>
          <td style="width: 25%;height: auto; ">无 </td>
          <?php }?>
          
           <?php if ($v['is_adv']==1){?>
          <td style="width: 10%;height: auto;">广告</td>
          <td style="width: 30%;height: auto;">无</td>
          <td style="width: 25%; height: auto;">无 </td>
          <?php }?>
          
          <td style="width: 30%; height: auto;"><img alt="" style="width: 50%;height: auto;" src="<?php echo $v['gs_tp_image'];?>"> </td>
          

          <td style="width: 15%; height: auto;"><a href="index.php?act=goods_templates&op=goods_templates_add&gs_tp_id=<?php echo $v['gs_tp_id'];?>"><?php echo $lang['nc_edit'];?></a> </td>
        </tr>
<?php }?>
        <?php }else { ?>
        <tr class="no_data">
          <td colspan="10"><?php echo $lang['nc_no_record'];?></td>
        </tr>
        <?php } ?>
      </tbody>
      <tfoot>
        <?php if(!empty($output['link_list']) && is_array($output['link_list'])){ ?>
        <tr class="tfoot" id="dataFuncs">
          <td></td>
          <td colspan="16" id="batchAction">
            <div class="pagination"> <?php echo $output['page'];?> </div></td>
        </tr>
      </tfoot>
      <?php } ?>
    </table>
</div>
<script type="text/javascript" src="<?php echo RESOURCE_SITE_URL;?>/js/jquery.edit.js" charset="utf-8"></script>
